package com.demo.strategy.st_02;

import java.math.BigDecimal;

/**
 * @Author: shubin_yao
 * @Date: 2022/05/15/23:01
 * @Description:  策略控制
 *
 *  策略控制类
 */
public class ContextHandle<T> {
    private ICouponDiscount<T> couponDiscount;

    public ContextHandle(ICouponDiscount<T> couponDiscount) {
        this.couponDiscount = couponDiscount;
    }
    public BigDecimal discountAmount(T couponInfo, BigDecimal skuPrice) {
        return couponDiscount.discountAmount(couponInfo, skuPrice);
    }
}
